﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace IceDog.DNC.Program.TodoApi.Controllers
{
    /// <summary>
    /// 
    /// </summary>
    [Produces("application/json")]
    [Route("api/DateTime")]
    public class DateTimeController : Controller
    {
        [HttpGet]
        public Dictionary<string, object> Get()
        {
            return new Dictionary<string, object>()
            {
                {"now",DateTime.Now }
            };
        }

        [HttpGet("{day}",Name = "GetDay")]
        public Dictionary<string, object> GetDay(int day)
        {
            var d= new DateTime(2018,5,day);
            return new Dictionary<string, object>()
            {
                {"date", d}
            };
        }
    }
}